#include "stdafx.h"
#include "ImageProcMatlabLib.h"
#include "SampleMxFn.h"

IMAGEPROCMATLABLIB_API IImageProcStepLibDyn *CreateImageProcStepLib() //this function name must match ImageExptLib::CreateFunctionName 
{
	return new ImageProcMatlabLib();
}

ImageProcMatlabLib::ImageProcMatlabLib(void) :
	_LibApi('\0')
{
	_LibApi = new ImageProcStepLibAuto();
							//todo - get this information from VS_VERSION_INFO so it is consistent with DLL file props
	_LibApi->SetLibNameVersion(GetLibName(), GetLibVersion(), GetLibInterfaceVersion());
	_LibApi->SetLibOwnerDetails("Maximodex Limited", "Copyright 2012, Will Stott", "www.maximodex.com/ProductSupport/ImageCurator/ImageProcLibs/ImageProcOpenCVLib");
	_LibApi->SetLibDescription("Demo Matlab Library v1.0.0.0 - Developed by Yuchen Wang");

	/*IResize *resize = new IResize();
	if(_LibApi->AddFunction(resize) == false)
		delete resize;*/


	_LibApi->Validate();
}


ImageProcMatlabLib::~ImageProcMatlabLib(void)
{
	ImageExptLib::LogMsg("ImageProcMatlabLib::~ImageProcMatlabLib", "entry");	
	if (_LibApi != '\0')
	{
		ImageExptLib::LogMsg("ImageProcMatlabLib::~ImageProcMatlabLib", "delete _LibApi");	
		delete _LibApi;
	}
	_LibApi = '\0';
	ImageExptLib::LogMsg("ImageProcMatlabLib::~ImageProcMatlabLib", "exit");	
}

bool ImageProcMatlabLib::Run(const char *fnName, ProcParamsInputs *inputs, ProcParamsOutputs *outputs)
{
	bool rc = false;
	
	return rc;
}
